/*
 * @Author: wwl 2967796480@qq.com
 * @Date: 2023-08-08 08:58:00
 * @LastEditors: wwl 2967796480@qq.com
 * @LastEditTime: 2023-08-22 09:50:51
 * @FilePath: \ConstantBlueCloud_WEB_USER_DZ1\src\api\user.ts
 * @Description: 
 * 
 * Copyright (c) 2023 by ${git_name_email}, All Rights Reserved. 
 */
import Request from '@/libs/request'

/**查询个人设置所有信息 */
export const uSelectWebUserInfo = (data: { userId: string }) =>
  Request.get<User.Info>('/platFormSubUser/selectInfo', {
    platFormSubUserId: data.userId
  })

/**用户修改公司名称 */
export const uEditUserCompany = (data: { userid: number; userCompany: string }) =>
  Request.get<null>('/platFormSubUser/editCompany', {
    platFormSubUserId: data.userid,
    userCompany: data.userCompany
  })

/**用户修改邮箱 */
export const uEditMyEmail = (data: { userId: number; userEmail: string }) =>
  Request.get<null>('platFormSubUser/editEmail', {
    platFormSubUserId: data.userId,
    userEmail: data.userEmail
  })

/**用户修改昵称 */
// export const uEditUserNearName = (data: { userId: number; userNearName: string }) =>
//   Request.get<null>('/user/uEditUserNearName', {
//     userId: data.userId,
//     userNearName: data.userNearName
//   })


/**用户修改密码 */
export const uEditUserPassword = (data: { userId: number; userOldPassword: string, userNewPassword:string }) =>
  Request.get<null>('/platFormSubUser/editPassword', {
    platFormSubUserId: data.userId,
    platFormSubUserPass:data.userOldPassword,
    newPlatFormSubUserPass: data.userNewPassword
  })


/**用户修改绑定手机号 */
export const uEditUserPhone = (data: { userId: number; newUserPhone: string; verfiyCode: string }) =>
  Request.get<null>('/user/uEditUserPhone', data)
